// pages/shop/good/good.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    hoverId: 0,
    msg:"aaa",
    list: [
      {
        title: "美妆个护", listCon: [{
          typename: "美容护肤",
          typeid: 1,
          content: [
            { id: 1, title: "面膜", img: '../../../asset/image/groom1.jpg' },
            { id: 2, title: "防晒", img: '../../../asset/image/groom1.jpg' },
            { id: 3, title: "喷雾", img: '../../../asset/image/groom1.jpg' },
            { id: 4, title: "护肤套装", img: '../../../asset/image/groom1.jpg' },
            { id: 5, title: "面霜/颈霜", img: '../../../asset/image/groom1.jpg' },
            { id: 6, title: "洁面", img: '../../../asset/image/groom1.jpg' },
            { id: 7, title: "爽肤水", img: '../../../asset/image/groom1.jpg' },
            { id: 8, title: "面部精华", img: '../../../asset/image/groom1.jpg' },
            { id: 9, title: "乳液/啫喱", img: '../../../asset/image/groom1.jpg' }
          ]
        },
        {
          typename: "彩妆护理",
          typeid: 2,
          content: [],
          msg: { text: "暂无商品", lineHeight:'auto'}
        },
        {
          typename: "个人护理",
          typeid: 3,
          content: [{ id: 1, title: "沐浴洗护", img: '../../../asset/image/groom1.jpg' },
          { id: 2, title: "身体护理", img: '../../../asset/image/groom1.jpg' },
          { id: 3, title: "手足护理", img: '../../../asset/image/groom1.jpg' },
          ]
        }]
      },
      {
        title: "食品饮料", listCon: [{
          typename: "人气零食",
          typeid: 1,
          content: [{ id: 1, title: "坚果炒货", img: '../../../asset/image/groom1.jpg' },
          { id: 2, title: "美味糕点", img: '../../../asset/image/groom1.jpg' },
          { id: 3, title: "好味饼干", img: '../../../asset/image/groom1.jpg' },
          { id: 4, title: "肉制零食", img: '../../../asset/image/groom1.jpg' },
          { id: 5, title: "蜜饯果干", img: '../../../asset/image/groom1.jpg' },
          { id: 6, title: "糖果/巧克力", img: '../../../asset/image/groom1.jpg' },
          { id: 7, title: "豆制海制品", img: '../../../asset/image/groom1.jpg' },
          { id: 8, title: "膨化食品", img: '../../../asset/image/groom1.jpg' }
          ]
        },
        {
          typename: "饮料冲调",
          typeid: 2,
          content: [{ id: 1, title: "热饮料", img: '../../../asset/image/groom1.jpg' },
          { id: 2, title: "葡萄酒", img: '../../../asset/image/groom1.jpg' },
          { id: 3, title: "白酒", img: '../../../asset/image/groom1.jpg' },
          { id: 4, title: "啤酒", img: '../../../asset/image/groom1.jpg' },
          { id: 5, title: "麦片/谷物", img: '../../../asset/image/groom1.jpg' },
          { id: 6, title: "咖啡/奶茶", img: '../../../asset/image/groom1.jpg' },
          { id: 7, title: "液态奶/奶粉", img: '../../../asset/image/groom1.jpg' },
          { id: 8, title: "脂蛋白饮料", img: '../../../asset/image/groom1.jpg' }
          ]
        }]
      },
      {
        title: "母婴玩具", listCon: [], msg: { text: "暂无分类", lineHeight:"50vh" }
      }
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },
  tab: function (e) {
    console.log(e)
    var currentTarget = e.currentTarget.dataset.hover;
    this.setData({
      hoverId: currentTarget
    })
  },
  navigator:function(e){
    console.log(e)
    var id = e.currentTarget.id,text = e.currentTarget.dataset.text
    wx.navigateTo({
      url: 'goodList?tid =' + id+'&nav='+text,
    })
  }
})